package org.snia.server.dispatcher;

import java.util.Map;

import org.snia.cdmi.model.AccessControlList;
import org.snia.cdmi.model.Container;
import org.snia.cdmi.model.ContainerProperties;
import org.snia.cdmi.model.DataObject;
import org.snia.cdmi.model.DataObjectProperties;
import org.snia.cdmi.model.InputDataObject;
import org.snia.cdmi.model.MetaDataObject;
import org.snia.server.security.SecurityService;

public interface Dispatcher extends SecurityService {

	/**************************容器服务********************************/
	
	public void createContainer(Container container);

	public void deleteContainer(String container);

	public void setAccessControlPolicy(String container, AccessControlList acl);

	public Map<String, String> getAccessControlList(String container);

	public ContainerProperties getProperties(String container, boolean withMetadata);

	public void setUserMetadata(String container, Map<String, String> metaMap);

	public Map<String, String> getUserMetadata(String container);
	

	/**************************对象服务********************************/

	public void createDataObject(InputDataObject object);

	public void deleteDataObject(String container, String objectUri);

	public DataObject getDataObject(String container, String objectUri);

	public void setAccessControlPolicy(String container, String objectUri,
			AccessControlList acl);

	public void setUserMetadata(String container, String objectUri,
			Map<String, String> metaMap);

	public Map<String, String> getUserMetadata(String container,
			String objectUri);

	public DataObjectProperties getProperties(String container,
			String objectUri, boolean withMetadata);

	public Map<String, String> getAccessControlList(String container,
			String objectUri);

	public MetaDataObject copyDataObject(String source, String container,
			String objectUri, boolean replaceFlag);
}
